3.2165 \(\int \frac{5+4 x+x^2}{-2+x} \, dx\)

Optimal. Leaf size=19 \[ \frac{x^2}{2}+6 x+17 \log (2-x) \]

[Out]

6*x + x^2/2 + 17*Log[2 - x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0292375, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071 \[ \frac{x^2}{2}+6 x+17 \log (2-x) \]

Antiderivative was successfully verified.

[In]  Int[(5 + 4*x + x^2)/(-2 + x),x]

[Out]

6*x + x^2/2 + 17*Log[2 - x]

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ 6 x + 17 \log{\left (- x + 2 \right )} + \int x\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**2+4*x+5)/(-2+x),x)

[Out]

6*x + 17*log(-x + 2) + Integral(x, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00561538, size = 18, normalized size = 0.95 \[ \frac{x^2}{2}+6 x+17 \log (x-2)-14 \]

Antiderivative was successfully verified.

[In]  Integrate[(5 + 4*x + x^2)/(-2 + x),x]

[Out]

-14 + 6*x + x^2/2 + 17*Log[-2 + x]

_______________________________________________________________________________________

Maple [A]  time = 0.004, size = 16, normalized size = 0.8 \[{\frac{{x}^{2}}{2}}+6\,x+17\,\ln \left ( x-2 \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^2+4*x+5)/(x-2),x)

[Out]

1/2*x^2+6*x+17*ln(x-2)

_______________________________________________________________________________________

Maxima [A]  time = 0.779462, size = 20, normalized size = 1.05 \[ \frac{1}{2} \, x^{2} + 6 \, x + 17 \, \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 4*x + 5)/(x - 2),x, algorithm="maxima")

[Out]

1/2*x^2 + 6*x + 17*log(x - 2)

_______________________________________________________________________________________

Fricas [A]  time = 0.215289, size = 20, normalized size = 1.05 \[ \frac{1}{2} \, x^{2} + 6 \, x + 17 \, \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 4*x + 5)/(x - 2),x, algorithm="fricas")

[Out]

1/2*x^2 + 6*x + 17*log(x - 2)

_______________________________________________________________________________________

Sympy [A]  time = 0.132815, size = 14, normalized size = 0.74 \[ \frac{x^{2}}{2} + 6 x + 17 \log{\left (x - 2 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**2+4*x+5)/(-2+x),x)

[Out]

x**2/2 + 6*x + 17*log(x - 2)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.203556, size = 22, normalized size = 1.16 \[ \frac{1}{2} \, x^{2} + 6 \, x + 17 \,{\rm ln}\left ({\left | x - 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 4*x + 5)/(x - 2),x, algorithm="giac")

[Out]

1/2*x^2 + 6*x + 17*ln(abs(x - 2))